package com.yu.util;

import java.net.InetSocketAddress;

/**
 * @PackageName: com.yu.util
 * @Description:
 * @Version: v1.0.0
 * @Author: yuweilin
 * @Date: 12:42
 * <p>
 * Modification History:
 * Date         Author          Version            Description
 * ------------------------------------------------------------
 * 2021/2/6      yuweilin         v1.0.0               新建
 */
public class InetSocketAddrUtil {
    private InetSocketAddrUtil(){}

    public static String getString(InetSocketAddress inetSocketAddress){
        String hostAndPort = inetSocketAddress.toString();
        int index = hostAndPort.indexOf("/");
        hostAndPort = hostAndPort.substring(index);
        return hostAndPort;
    }
}
